/*
 *  Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
 *
 *  This program and the accompanying materials are made available under the
 *  terms of the Apache License, Version 2.0 which is available at
 *  https://www.apache.org/licenses/LICENSE-2.0
 *
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Contributors:
 *       Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
 *
 */

package org.eclipse.edc.sql.translation;

import org.eclipse.edc.spi.query.Criterion;

/**
 * Converts a {@link Criterion} into a {@link WhereClause} that sql requires in order to perform queries against
 * its backend.
 */
@FunctionalInterface
public interface CriterionToWhereClauseConverter {

    /**
     * converts a {@link Criterion} into a {@link WhereClause} query object.
     *
     * @param criterion the criterion.
     * @return the where condition.
     */
    WhereClause convert(Criterion criterion);
}
